package com.tangchao.client.sdh.view.card
{
	import flash.display.MovieClip;

	public class SelfOutCard extends MovieClip
	{
		private var _cardArray:Array=[];
		public function SelfOutCard()
		{
			this.mouseEnabled=false;
			this.mouseChildren=false;
		}
		
		public function create(arr:Array)
		{
			var i:int=0;
			destroy();
			for(i=0;i<arr.length;i++)
			{
				var card:CardCell=new CardCell();
				card.index=arr[i];
				card.x=i*12;
				addChild(card);
				card.width=60;
				card.height=81;
				card.rotationX=-60;
				_cardArray.push(card);
			}
		}
		
		public function destroy()
		{
			var i:int=0;
			for(i=0;i<_cardArray.length;i++)
			{
				var card:CardCell=_cardArray[i] as CardCell;
				if(card)
				{
					card.destroy();
					card=null;
				}
			}
			_cardArray.length=0;
		}

	}
}